﻿@model Magicodes.WeiChat.Data.Models.WeiChat.WeiChat_QRCode

@{
    ViewBag.Title = "删除";
}
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-9">
        <h2>@ViewBag.Title</h2>
        <ol class="breadcrumb">
            <li>
                <a href="/">主页</a>
            </li>
            <li>
                <a href="@Url.Action("Index")">二维码管理</a>
            </li>
            <li class="active">
                <strong>@ViewBag.Title</strong>
            </li>
        </ol>
    </div>
</div>

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <hr style="margin:2px 2px 10px 2px;" />
                    <dl class="dl-horizontal">
                        <dt>
                            @Html.DisplayNameFor(model => model.ParamsValue)
                        </dt>

                        <dd>
                            @Html.DisplayFor(model => model.ParamsValue)
                        </dd>
                        <dt>
                            @Html.DisplayNameFor(model => model.ExpireSeconds)
                        </dt>

                        <dd>
                            @Html.DisplayFor(model => model.ExpireSeconds)
                        </dd>
                        <dt>
                            @Html.DisplayNameFor(model => model.ExpireTime)
                        </dt>

                        <dd>
                            @(Model.ExpireTime == null ? "永久" : Model.ExpireTime.Value.ToString("yy-MM-dd HH:mm:ss"))
                        </dd>


                        <dd>
                            <img src="@Magicodes.WeChat.SDK.WeChatApisContext.Current.QrCodeApi.GetQrCodeUrl(Model.Ticket)" width="300" height="300" />
                        </dd>
                        <dt>
                            @Html.DisplayNameFor(model => model.Remark)
                        </dt>

                        <dd>
                            @Html.DisplayFor(model => model.Remark)
                        </dd>
                    </dl>

                    @using (Html.BeginForm())
                    {
                        @Html.AntiForgeryToken()

                        <div class="form-actions no-color">
                            <button type="button" class="btn btn-warning pull-right" id="btnDelete"><i class="fa fa-remove"></i>&nbsp;&nbsp;删除</button>
                            <br />
                            @Html.ActionLink("返回", "Index")
                        </div>
                    }
                </div>
            </div>
        </div>
    </div>
</div>
@section Styles {
    @Styles.Render("~/Content/plugins/iCheck/iCheckStyles")
}
@section Scripts {
    @Scripts.Render("~/plugins/iCheck")
    <script type="text/javascript">
        $(function () {
            $("input[type=checkbox]").iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
            $('#btnDelete').on('click', function () {
                mwc.message.confirm("确定要删除么？", "警告", function (result) {
                    if (result) {
                        mwc.ui.setBusy();
                        $('form').submit();
                    }
                });
            });
        });
    </script>
}
